<!-- Generated automatically at 12/04/2011 -->
<div id="advertisement-show" class="advertisement_<?php echo $advertisementId ?>">	<!-- Begin advertisement content -->
	<div id="advertisement-content">		<div id="title" class="row"><?php echo $title ?></div>
		<div id="created-at" class="row">
		  <span class="date"><i>Đăng ngày</i> <b><?php echo $date ?></b></span>
		  <span class="time"> <i>lúc</i> <b><?php echo $time ?></b></span>
		  <span class="category"><i>Danh mục</i> <b><?php echo $categoryName ?></b></span>
		</div>

		<div class="separator"></div>

		<div class="row" class="row">
			<span id="price"><i>Giá</i> <b><?php echo $price ?></b></span>
			<span id="locality"><i>Thành phố</i> <b><?php echo $townName ?> (<?php echo $townCode ?>)</b></span>
		</div>
		
		<div class="separator"></div>
		
		<div id="photo" class="row">
			<img src="<?php echo $photo ?>" />
		</div>
		<div id="thumbs" class="row">
			<?php if(sizeof($thumbs)>1): ?>
			<?php for($i=0; $i<sizeof($thumbs); $i++): ?>
				<?php preg_match('|.*\/(thumb_[0-9]+)\.jpg|', $thumbs[$i], $thumbId); ?>
				<div class="thumb"><img id="<?php echo $thumbId[1] ?>" src="<?php echo $thumbs[$i] ?>" /></div>
			<?php endfor; ?>
		<?php endif; ?>
		</div>
		
		<div class="separator"></div>
		
		<div id="description" class="row"><pre><?php echo $description ?></pre></div>	</div>
		<!-- End advertisement content -->
		<!-- Begin contact form -->
		<div id="advertisement-contact-form">
			<div class="header">Liên hệ</div>
			<div id="poster-name"><img class="icon" src="<?php echo IMAGES_URL.'iconUser.png' ?>" /> <b><?php echo $name ?></b></div>
			<div id="poster-telephone"><img class="icon" src="<?php echo IMAGES_URL.'iconTelephone.jpg' ?>" /> <b><?php echo $telephone ?></b></div>
			<div id="poster-email"><img class="icon" src="<?php echo IMAGES_URL.'iconEmail.gif' ?>" /> <b><?php echo $email ?></b></div>
			<div id="collapse-send-email-form" align="center"><img src="<?php echo IMAGES_URL.'iconCollapse.gif' ?>" /></div>
			<table id="send-email-form" class="hidden">
				<tr>
					<td class="label">Tên bạn</td>
					<td class="input"><?php echo htmlGenTextBox('contact-name', 'contact-name', '', '', 20) ?></td>
				</tr>
				<tr><td></td><td><div class='error' id="error-name"></div></td></tr>
				
				<tr>
					<td class="label">Email</td>
					<td class="input"><?php echo htmlGenTextBox('contact-email', 'contact-email', '', '', 25) ?></td>
				</tr>
				<tr><td></td><td><div class='error' id="error-email"></div></td></tr>
				
				<tr>
					<td class="label">Tel</td>
					<td class="input"><?php echo htmlGenTextBox('contact-telephone', 'contact-telephone', '', '', 12) ?><span class="note">*Không bắt buộc</span></td>
				</tr>
				<tr><td></td><td><div class='error' id="error-telephone"></div></td></tr>
				
				<tr>
					<td class="label">Nội dung</td>
					<td class="input"><?php echo htmlGenTextArea('contact-content', 'contact-content', '', '', 10, 25) ?></td>
				</tr>
				<tr><td></td><td><div class='error' id="error-content"></div></td></tr>
				
				<tr>
					<td colspan="2"><div align="center" id="btn-send"><?php echo htmlGenButton('contact-send', 'contact-send', 'Gửi Email') ?></div></td>
				</tr>
			</table>
		</div>	<!-- End contact form -->
	</div>
<div id="right-ad-120x600"></div>